package v1beta1connect

import (
	"github.com/raystack/frontier/pkg/errors"
)

var (
	ErrBadRequest                  = errors.New("invalid syntax in body")
	ErrInvalidMetadata             = errors.New("metadata schema validation failed")
	ErrOperationUnsupported        = errors.New("operation not supported")
	ErrInternalServerError         = errors.New("internal server error")
	ErrUnauthenticated             = errors.New("not authenticated")
	ErrUnauthorized                = errors.New("not authorized")
	ErrNotFound                    = errors.New("not found")
	ErrInvalidEmail                = errors.New("Invalid email")
	ErrUserNotExist                = errors.New("user doesn't exist")
	ErrInvalidNamesapceOrID        = errors.New("namespace and ID cannot be empty")
	ErrConflictRequest             = errors.New("already exist")
	ErrBadBodyMetaSchemaError      = errors.New(ErrBadRequest.Error() + " : " + ErrInvalidMetadata.Error())
	ErrInvalidActorType            = errors.New("invalid actor type")
	ErrActivityRequired            = errors.New("activity is required")
	ErrStatusRequired              = errors.New("status is required")
	ErrProspectIdRequired          = errors.New("prospect ID is required")
	ErrProspectNotFound            = errors.New("record not found for the given input")
	ErrRQLParse                    = errors.New("error parsing RQL query")
	ErrOrgDisabled                 = errors.New("org is disabled. Please contact your administrator to enable it")
	ErrRoleFilter                  = errors.New("cannot use role filters and with_roles together")
	ErrMinAdminCount               = errors.New("org must have at least one admin, consider adding another admin before removing")
	ErrDomainNotFound              = errors.New("domain whitelist request doesn't exist")
	ErrDomainAlreadyExists         = errors.New("domain name already exists for that organization")
	ErrInvalidHost                 = errors.New("invalid domain, no such host found")
	ErrTXTRecordNotFound           = errors.New("required TXT record not found for domain verification")
	ErrDomainMismatch              = errors.New("user and org's whitelisted domains doesn't match")
	ErrInvitationNotFound          = errors.New("invitation not found")
	ErrInvitationExpired           = errors.New("invitation expired")
	ErrAlreadyMember               = errors.New("user is already a member of the organization")
	ErrEmptyEmailID                = errors.New("email id is empty")
	ErrEmailConflict               = errors.New("user email can't be updated")
	ErrCustomerNotFound            = errors.New("customer doesn't exist")
	ErrServiceUserNotFound         = errors.New("service user not found")
	ErrServiceUserCredNotFound     = errors.New("service user credentials not found")
	ErrConflictingPlanChange       = errors.New("cannot change plan and cancel upcoming changes at the same time")
	ErrNoChangeRequested           = errors.New("no change requested")
	ErrPerSeatLimitReached         = errors.New("per seat limit reached")
	ErrAlreadyOnSamePlan           = errors.New("already on same plan")
	ErrBillingProviderNotSupported = errors.New("provider not supported")
	ErrInsufficientCredits         = errors.New("insufficient credits")
	ErrAlreadyApplied              = errors.New("credits already applied")
	ErrInvalidRoleID               = errors.New("role id is invalid")
	ErrNamespaceSplitNotation      = errors.New("subject/object should be provided as 'namespace:uuid'")
	ErrPolicyNotFound              = errors.New("policy doesn't exist")
	ErrProjectNotFound             = errors.New("project doesn't exist")
	ErrGroupNotFound               = errors.New("group doesn't exist")
	ErrOrgNotFound                 = errors.New("org doesn't exist")
	ErrGroupMinOwnerCount          = errors.New("group must have at least one owner, consider adding another owner before removing")
	ErrPortalChangesKycCompleted   = errors.New("customer portal changes not allowed: organization kyc completed")
	ErrResourceNotFound            = errors.New("resource doesn't exist")
	ErrInvalidPreferenceFilter     = errors.New("invalid preference filter set")
	ErrTraitNotFound               = errors.New("preference trait not found, preferences can only be created with valid trait")
	ErrInvalidPreferenceValue      = errors.New("invalid value for preference")
	ErrMetaschemaNotFound          = errors.New("metaschema doesn't exist")
	ErrSessionNotFound             = errors.New("session doesn't exist")
	ErrInvalidSessionID            = errors.New("invalid session_id format: must be a valid UUID")
	ErrInvalidUserID               = errors.New("invalid user_id format: must be a valid UUID")
	ErrRoleNotFound                = errors.New("role doesn't exist")
)
